/*
 * This file is Copyright 2002-2006 Loyola University Chicago,
 * Department of Computer Science and the Emerging Technologies Laboratory.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License via
 *    http://www.apache.org/licenses/LICENSE-2.0.
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.citep.business;

import java.util.Set;
import java.util.Date;

public interface Transaction {
	
	
	/**
	 *  Get the id of the transaction.
	 * @return id
	 */
	public int getId();

	/**
	 * Get the systemTime of the transaction.  This time is generated 
	 * automatically when a transaction is created.
	 * @return  systemTime
	 */
	public Date getSystemTime();

	/**
	 * Get the transaction time.  This time is specified by the user and is not
	 * automatically generated.
	 * @return transaction time
	 */
	public Date getTransactionTime();

	/**
	 * Set the transaction time.  This time is specified by the user and is not
	 * automatically generated.
	 * @param  transactionTime  The new transactionTime value
	 */
	public void setTransactionTime(Date transactionTime);

	/**
	 * Gets the description of the transaction.
	 * @return description
	 */
	public String getMemo();

	/**
	 * Set the descriptioni of the transaction.
	 * @param  description  New description
	 */
	public void setMemo(String memo);

	/**
	 * Get the children entries.
	 * @return Collection of Entry objects
	 */
	public Set<Entry> getEntries();
	public void setEntries(Set<Entry> entries);

	/**
	 * Sets the user of the transaction.  This should be the user object of the
	 * user who created the transaction.
	 * @param user New userid
	 */
	public void setUser(User user);
	
	/**
	 * Get the user of the transaction.  This should be the user object of the
	 * user who created the transaction.
	 * @return userid
	 */
	public User getUser();
	
	/*
	 * Last time a transaction was modified. This includes creation.s
	 */
	public void setLastModified(Date date);
	public Date getLastModified();
	
	
}
